/**
 * 首页展示。container控件加载入口。
 */
import React from "react";
import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import reducer from "../reducers";
let AppContainer: any = null;
const applyMiddlewareTrunk = applyMiddleware(thunk);
const createStoreWithMiddleware = applyMiddlewareTrunk(createStore);
import { Provider } from "react-redux";

export default class StoreShopCard extends React.Component {
  store = createStoreWithMiddleware(reducer);

  constructor(props: any) {
    super(props);
  }

  render() {
    if (!AppContainer) {
      AppContainer = require("./StoreShopCardContainer").default;
    }

    return (
      <Provider store={this.store}>
        <AppContainer {...this.props} />
      </Provider>
    );
  }
}
